Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETQ instructeur si j'utilise un filtre de type choix, les valeurs possibles s'affichent dans un select #9560

Merged

Conversation

lisa-durand
Copy link
Contributor

closes #9515

On affiche dorénavant un <select> avec les options proposées, plutôt qu'un champ libre pour les champs de type "choix".
Capture d’écran 2023-10-04 à 15 27 05
Capture d’écran 2023-10-04 à 15 27 18

@lisa-durand lisa-durand force-pushed the instructeur-filter-display-select-for-multiple-field branch 2 times, most recently from d00c532 to 99199e9 Compare October 4, 2023 16:04
@lisa-durand lisa-durand force-pushed the instructeur-filter-display-select-for-multiple-field branch from 99199e9 to cde8c61 Compare October 5, 2023 09:32
@lisa-durand lisa-durand marked this pull request as ready for review October 5, 2023 12:44
@@ -462,7 +480,7 @@ def current_section_level(revision)
end

def self.filter_hash_type(type_champ)
if type_champ.in?([TypeDeChamp.type_champs.fetch(:departements), TypeDeChamp.type_champs.fetch(:regions)])
if type_champ.in?([TypeDeChamp.type_champs.fetch(:departements), TypeDeChamp.type_champs.fetch(:regions)]) || is_choice_type_from(type_champ)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai l'impression qu'on peut déclarer departements et regions comme choice type, non ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le "type" est utilisé pour organiser les champs dans la création du formulaire, j'ai donc pas touché aux catégories. "Region" et department" sont rangés dans le type "localisation". Du coup je ne sais pas si c'est un bon nommage ou une bonne idée que de les ajouter dans cette methode de type "choix" ?
Capture d’écran 2023-10-09 à 11 17 10

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je crois qu'on ne parle pas de la même chose. Je parle de la méthode que tu viens d'ajouter choice_type.

app/models/type_de_champ.rb Outdated Show resolved Hide resolved
app/models/type_de_champ.rb Outdated Show resolved Hide resolved
app/models/type_de_champ.rb Outdated Show resolved Hide resolved
lisa-durand and others added 4 commits October 11, 2023 17:11
Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
@lisa-durand lisa-durand added this pull request to the merge queue Oct 12, 2023
Merged via the queue into main with commit 5e8d592 Oct 12, 2023
15 checks passed
@lisa-durand lisa-durand deleted the instructeur-filter-display-select-for-multiple-field branch October 12, 2023 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants